<html>
  <head>
    <title>tallyFailedAuditVerify.html</title>
   <meta http-equiv="content-type" content="text/html; charset=utf-8">
   <link href="../../css/general1.css" rel="stylesheet" type="text/css" />
    <link href="style/css.css" rel="stylesheet" type="text/css" />
  	<script type="text/javascript" src="../../script/hiawardbpm.js"></script>
	<script type="text/javascript" src="../../script/prototype.js"></script>
	<script type="text/javascript">
    function subForm(){
          var webData=buildWebData();
          var xmlMsg=window.dialogArguments;
          alert(xmlMsg.getXmlDocument().xml);
          xmlMsg.setCommand(12);
          xmlMsg.setWebData(webData);
          xmlMsg.buildXML();
          var url="/vchzms-hiaward/ProcessAjaxHandler";
          alert(xmlMsg.getXmlDocument().xml);
          new Ajax.Request(url,{
          method:'post',
          postBody:xmlMsg.getXmlDocument().xml,
          contentType:'application/x-www-form-urlencoded',
          encoding:'UTF-8',
          onComplete:function(transport){
	          try{
		          if(200==transport.status){
		               alert('成功创建了一个新任务');
		               window.close();
		              }
		          if(400==transport.status){
		               alert('创建失败');
		              }
	          }catch(err){
	              alert('js异常');
	          }
          }
       		});
         }
         function buildWebData(){
	          var webData=new WebData();
	          var valueAgreement = document.getElementsByName("agreement");
	          var length = valueAgreement.length;
	          for(var i=0;i<length;i++){
	          	if(valueAgreement[i].checked){
	          		var agreement = valueAgreement[i].value;
	          	}
	          }
	          webData.setProperty('agreement',agreement);
	          return webData;
         }
  </script>
  </head>
  
  <body>
   <table class="font3" bgcolor="#6699FF">
			<tr>
				<td><img src="pic/00000001.jpg"></td>
				<td><table table class="font3" bgcolor="#6699FF">
			<tr>
				<td>
					帐号：
					<div id="accno"></div>
				</td>
			</tr>
			<tr>
				<td>
					金额：
					<div id="amount"></div>
				</td>
			</tr>
			<tr>
				<td>
					凭证号：
					<div id="vchno"></div>
				</td>
			</tr>
			<tr>
				<td>
					分行号:
					<div id="subno"></div>
				</td>
			</tr>
			<tr>
				<td>
					提入行号:
					<div id="brbank"></div>
				</td>
			</tr>
			<tr>
				<td>
					提出行号:
					<div id="vsbank"></div>
				</td>
			</tr>
			<tr>
				<td>
					记账失败审票结果:
					<div id="result"></div>
				</td>
			</tr>
			<tr>
				<td>
					
					<input type="radio" id="agreement" name="agreement" value="1">
					同意&nbsp;&nbsp;
					<input type="radio" id="agreement" name="agreement" value="0">不同意
				</td>

			</tr>
            <tr>
              <td><input type="button" name="button" value="提交" onclick="subForm()" /></td>
            </tr>
		</table></td>
			</tr>
		</table>
  </body>
  <script type="text/javascript">
      var xmlMsg=window.dialogArguments;
	  var accnoTemp=xmlMsg.getWebData().getProperty('accno');
	  var amountTemp=xmlMsg.getWebData().getProperty('amount');
	  var vchnoTemp=xmlMsg.getWebData().getProperty('vchno');
	  var subnoTemp=xmlMsg.getWebData().getProperty('subno');
	  var brbankTemp=xmlMsg.getWebData().getProperty('brbank');
	  var vsbankTemp=xmlMsg.getWebData().getProperty('vsbank');
	  var tallyFailedAuditResult=xmlMsg.getWebData().getProperty('result');
	  var result=(tallyFailedAuditResult=='1'?'重新记账':'退票');
	  document.getElementById('accno').innerHTML=accnoTemp;
	  document.getElementById('amount').innerHTML=amountTemp;
	  document.getElementById('vchno').innerHTML=vchnoTemp;
	  document.getElementById('subno').innerHTML=subnoTemp;
	  document.getElementById('brbank').innerHTML=brbankTemp;
	  document.getElementById('vsbank').innerHTML=vsbankTemp;
	  document.getElementById('result').innerHTML=result;
  </script>
</html>
